package com.solution.admin.order.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.order.dao.OrderLogDao;
import com.solution.admin.order.entity.OrderLogEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 订单日志流水DAO实现
 * @author lilp
 * @date 2017-09-18 19:25:36
 */
@Repository
public class OrderLogDaoImpl extends BaseDaoImpl<OrderLogEntity> implements OrderLogDao {

	/**
	 * 保存订单日志流水信息
	 * @param orderLogEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 19:25:36
	 */
	@Override
	public long saveOrderLog(OrderLogEntity orderLogEntity) {
		return super.insert(orderLogEntity);
	}

	/**
	 * 分页查询订单日志流水信息
	 * @param pageParam 分页对象
	 * @param orderLog 分页参数
	 * @return PageBean 分页参数及数据
	 * @author lilp
	 * @date 2017-09-18 19:25:36
	 */
	public PageBean listOrderLogPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新订单日志流水
	 * @param orderLogEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 19:25:36
	 */
	@Override
	public int updateOrderLog(OrderLogEntity orderLogEntity) {
		return super.update(orderLogEntity);
	}

	/**
	 * 删除订单日志流水
	 * @param orderLogId
	 * @return
	 * @author lilp
	 * @date 2017-09-18 19:25:36
	 */
	public int deleteOrderLogById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询订单日志流水
	 * @param param
	 * @return
	 * @author lilp
	 * @date 2017-09-18 19:25:36
	 */
	@Override
	public List<OrderLogEntity> listOrderLog( Map<String, Object> param) {
		return super.listBy(param);
	}
}
